<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">
    var i = 0;
    while (i < 10) {
        console.log(i);
        i++;
    }

    do {
        console.log(i);
        i--;
    } while (i > 0);

    for (i = 0; i < 10; i++) {
        console.log(i)
    }

    for (i = 0; i < 10; i++) {
        for (var j = 0; j < 10; j++) {
            document.write('*');
        }
        document.write('<br>')
    }

</script>
</body>
</html>